import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import de.congrace.exp4j.ExpressionBuilder;
import formula.calculator.R;

public class MainActivity extends Activity {
        
        ExpressionBuilder calc = new ExpressionBuilder("x+2");
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    
    public void onClick(View v) {
        Intent i = null;
        switch (v.getId()) {
        case R.id.trigonometry:
                i = new Intent(this, Trigonometry.class);
                break;
        case R.id.algebra:
                i = new Intent(this, Algebra.class);
                break;
//      case R.id.calculus:
//              i = new Intent(this, Calculus.class);
//              break;
        case R.id.chemistry:
                i = new Intent(this, Chemistry.class);
                break;
        case R.id.geometry:
                i = new Intent(this, Geometry.class);
                break;
        case R.id.physics:
                i = new Intent(this, Physics.class);
                break;
        }
        if(i != null) {
                startActivity(i);
        }
    }
    
}
